package com.hnzy.sbbjz;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.fasterxml.jackson.core.JsonProcessingException;

@SpringBootApplication
public class SbbjzApplication {

	public static void main(String[] args) throws JsonProcessingException {

		SpringApplication.run(SbbjzApplication.class, args);
		System.out.println("测试应用");

		Writer wanger = new Writer("沉默王二", 18);
		ObjectMapper mapper = new ObjectMapper();
		String jsonString = mapper.writerWithDefaultPrettyPrinter()
				.writeValueAsString(wanger);
		System.out.println(jsonString);
	}

}
